<?= $this->partial('partials/header.phtml', array('name' => $this->pageName)) ?>

<?// Активный пункт меню, реакция на наведение
echo $this->partial('partials/actionformenu.phtml') ?>










<!--Для кэширования:-->
<img src="./pictures/left_side_selected.png" style="display: none">
<img src="./pictures/center_side_selected.png" style="display: none">
<img src="./pictures/right_side_selected.png" style="display: none">
<img src="./pictures/li.png" style="display: none">
<img src="./pictures/buy.png" style="display: none">
<!--конец загрузки изображений-->

<div id="container">
    <div class="top-frame">
        <div class="bottom-frame">
            <?= $this->partial('partials/cap.phtml', array('name' => $this->name)) ?>
            <div style="clear: both;"></div>
<!--            <div class="small-border"></div>-->

            <div class="inner-top">

             <div class="inner-middle">
                <div class="ship">
                  <div id="content">

                        <div class="ship-right">
                            <?if ($this->pageName): ?>
                                <h2 style="padding-left: 0px !important; margin-top: 30px;  text-align: center;">
                                    <? if($_SERVER['REQUEST_URI']=='/'):?>
                                        <script>
                                            var site = '<?= $this->pageName; ?>';
                                            if(site=='Welcome to TreasureAce.com')
                                            {
                                                var varSplit=site.split(' ');
                                                var count=varSplit.length-1;
                                                var lastWord=varSplit[count];

                                                var finishLink='<a href="/" style="color: orange; text-decoration: underline;">'+lastWord+'</a>';

                                                document.write('Welcome to '+finishLink);
                                            }
                                        </script>
                                    <? else:  echo $this->pageName;?>
                                    <?endif;?>

                                   
                                  

                                </h2>


                            <? else: echo '<h2 style="padding-left: 0px !important; margin-top: 30px; text-align: center;">Discover Treasures</h2>';?>
                            <?endif?>
                        </div>

                        

                        <div id="right">
                             <? if (is_array($this->messages)): ?>
                            <? foreach ($this->messages as $key => $value): ?>
                                <? if (count($value)): ?>
                                    <div class="messages <?= $key ?>">
                                        <ul>
                                            <? foreach ($value as $msg): ?>
                                            <li><?= $msg ?></li>
                                            <? endforeach; ?>
                                        </ul>
                                    </div>
                                    <? endif; ?>
                                <? endforeach; ?>
                            <? endif; ?>
                          
                            <?= $this->layout()->content ?>
                        </div>

                        <?= $this->partial('partials/right-menu.phtml', array('timer' => $this->timer,'mapInfo'=>$this->mapInfo)) ?>

                        <div style="clear: both;"></div>
                        <div class="inner-bottom"></div>
                        <div style="clear: both;"></div>
                  </div>
                    <!--
                                                   <div class="inner-bottom"></div>-->
                </div>
                </div>


            </div>
            <div style="clear: both;"></div>

            <?= $this->partial('partials/foot.phtml') ?>


        </div>
    </div>

</div>
</body>


</html>